package com.intelligentclass.mydata;

import java.util.ArrayList;
import java.util.List;

public class MyTreeNode {

    private int id;
    private String name;
    private List<MyTreeNode> children;

    private int isLeaf;


    public MyTreeNode() {
        children = new ArrayList<MyTreeNode>();
    }

    public void setChildren(List<MyTreeNode> children) {
        this.children = children;
    }
    public List<MyTreeNode> getChildren() {
        return children;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
    public void setId(int id) {
        this.id = id;
    }
    public int getId() {
        return id;
    }

    public void addChild(MyTreeNode child) {
        children.add(child);
    }

    public void setIsLeaf(int isLeaf) {
        this.isLeaf = isLeaf;
    }
    public int getIsLeaf() {
        return isLeaf;
    }
}
